package com.smile.model.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class AddUserRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "账号不能为空")
    private String userName;

    @NotBlank(message = "姓名不能为空")
    private String realName;

    @NotBlank(message = "手机号不能为空")
    @Length(min = 11,max = 11,message = "手机号不满足11位")
    private String mobile;

    @NotBlank(message = "密码不能为空")
    private String password;

    @NotNull(message = "所属组织不能为空")
    private Long organizationId;

    @NotNull(message = "角色不能为空")
    private Long roleId;

    @NotNull(message = "状态不能为空")
    private Integer status;
}
